package FactoryMethod;

public abstract class AbstractFactory {
    public abstract AbstractProduct FactoryMethod();
}

class factoryA extends AbstractFactory{
    @Override
    public AbstractProduct FactoryMethod() {
        return new productionA();
    }
}

class factoryB extends AbstractFactory{
    @Override
    public AbstractProduct FactoryMethod() {
        return new productionB();
    }
}